<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/head.jsp"%>
<%@ include file="/WEB-INF/views/include/treetable.jsp" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <title>${fns:getConfig('productName')}信息管理系统</title>
    <link rel="stylesheet" href="${ctxStatic}/css/DateTimePicker.css">
    <link rel="stylesheet" href="${ctxStatic}/css/jquery.mCustomScrollbar.css">
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <script src="${ctxStatic}/jquery/jquery-1.9.1.min.js"></script>
    <script src="${ctxStatic}/jquery/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="${ctxStatic}/js/DateTimePicker.js"></script>
	<script src="${ctxStatic}/js/layer.js"></script>
	<script src="${ctxStatic}/echartJs/echarts.min.js"></script>
    <script>
        function dtOnclick(a){
                $(a).siblings().slideToggle(300);
        }
        (function($){
            $(document).ready(function(){
                $("#sidebar-box").mCustomScrollbar({
                            mouseWheel:true,
                            mouseWheelPixels:100,
                            scrollInertia:550
                        }
                );
              //设置导航信息 
                $('.setNavigation').on('click',function(){
                	var mainMenuName = $(".nav").eq(0).find("li.active").eq(0).text();
                	$("#posNav").html("首页>"+mainMenuName+">"+$(this).attr("parentName_Value")+"><b style='color:black;font-size:14'>"+$(this).attr("childName_Value")+"</b>");
                })
            });
        })(jQuery);
        //每隔五分钟刷新一次
        function mailMessageFlash(){ 
        	var url = "${ctx}/getMailMessage";
        	$.post(url,"",function(result){
				$("#mailMessage").html($(callBackHtml(result)).find("#mailMessage").html());
			},'html');
        } 
      //每隔一分钟刷新一次
        function produceFlash(){ 
        	var url = "${ctx}/getProduce";
        	$.post(url,"",function(result){
				$("#productionItem").html($(callBackHtml(result)).find("#productionItem").html());
			},'html');
        } 
        //重复执行某个方法 
        window.setInterval("mailMessageFlash()",300000); 
        window.setInterval("produceFlash()",60000); 
        //去掉定时器的方法 
        //window.clearInterval(t2);  
        
        //menu链接 
        function reloadFrame(href){
        	document.getElementById("mainFrame").contentWindow.location.href = href;
        }
    </script>
</head>
<body>
<div class="header clearfix">
    <div class="logo" style="margin-top:5px">
        <!-- img src="${ctxStatic}/images/zhenyuLogo.png" style="width: 140px; height: 28px;"-->
    </div>
    <div class="userNzme">
        <span>${user.firstName}${user.lastName}</span>
        <span>${fns:getDate('yyyy-MM-dd')}</span>
    </div>
    <div class="user">
        <%-- <div class="news">
            <img src="${ctxStatic}/images/icon-news.png">
            <span>8</span>
        </div> --%>
        <div class="out">
            <img src="${ctxStatic}/images/icon-out.png">
            <span><a href="${ctx}/logout" title="<spring:message code="index_log_out"/>"><spring:message code="index_exit"/></a></span>
        </div>
    </div>
    <ul class="nav clearfix">
      <c:forEach items="${fns:getMenuList()}" var="menu" varStatus="idxStatus">
     		<c:if test="${menu.parent.id eq 0}">
				    <li id="${menu.id}">${menu.menuName}</li>
          </c:if>
        </c:forEach>  
    </ul>
</div>
<div class="clearfix content" style="height:100%">
    
    <div class="menuIndex">

        <div style="position:relative;width: 32%; height:350px; float: left;">
            <%@ include file="/WEB-INF/views/modules/sys/orderQuantityInfo.jsp" %>
        </div>
        <div style="position:relative;width: 38%; height:350px; float: left;">
            <%@ include file="/WEB-INF/views/modules/sys/mailMessage.jsp" %>
        </div>
        <div style="position:absolute;width: 32%; height:350px; top:350px; left:0px; float:left;">
            <%@ include file="/WEB-INF/views/modules/sys/qualityInspection.jsp" %>
        </div>
        <div style="position:absolute;width: 38%; height:350px; top:350px; left:32%; float: left;">
            <%@ include file="/WEB-INF/views/modules/sys/productionItem.jsp" %>
        </div>
        
    </div>
    <div class="leftNav">
        <%@ include file="/WEB-INF/views/modules/sys/setUpCenterList.jsp" %>
        
        <div class="slideBox iconLeft"></div>
    </div>
    <div class="iframeBox">
    	<div id="posNav" class="posNav">
        	<spring:message code="index_home_menu"/>
        </div>
        <iframe id="mainFrame"   name="mainFrame" frameborder="0" width="100%" scrolling="no"></iframe>
    </div>
</div>
<div id="dtBox1"></div>
<%@ include file="/WEB-INF/views/include/footer.jsp"%>
<script src="${ctxStatic}js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="${ctxStatic}/js/menu.js"></script>
</body>
</html>